<?php
namespace x\db\driver;
use mysqli;
class Mysqlidb1 extends Base{
    //初始化链接
    public function init($config){
        $this->mysqli= new mysqli($config['host'],$config['user'],$config['pwd'],$config['dbname']);
        if ($this->mysqli->connect_errno){
            die('Connect Error: ' . $this->mysqli->connect_errno);
        }else{
            $this->mysqli->query('set names utf8');
            $this->mysqli->autocommit(true);
        }
        return $this;
    }
}
